<!DOCTYPE html>
<html>
<head>
	<script type="text/javascript" src="__PUBLIC__/easyui/jquery.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/easyui/locale/easyui-lang-zh_CN.js"></script>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/gray/easyui.css">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/icon.css">
	<script type="text/javascript" src="__PUBLIC__/js/add-tab.js"></script>
	<link rel="stylesheet" href="__PUBLIC__/css/common.css" />
	<link rel="stylesheet" href="__PUBLIC__/js/kindeditor/themes/default/default.css" />
    <script src="__PUBLIC__/js/kindeditor/kindeditor-min.js"></script>
    <script src="__PUBLIC__/js/kindeditor/lang/zh_CN.js"></script>
    <script type="text/javascript">
		KindEditor.ready(function(K) {
		window.editor = K.create('.info_content',{resizeType: 0,allowFileManager: true,allowImageRemote:false,afterBlur: function(){this.sync();}});

	});
    	$(function(){
			$('#saveInfo').form({
				url:'__APP__/Information/saveInfoPost',
			    onSubmit:function(){
			        return $(this).form('validate');
			    },
			    success:function(data){
			    	if(data=='no'){
			    		$.messager.alert('提示', '修改失败！', 'info');
			    	}
			    	else{
			    		$.messager.alert('提示', '修改成功！', 'info');
				    	if(data=='新闻'){
				    		location.href = "__APP__/Information/newsList";
				    	}
				    	if(data=='公告'){
				    		location.href = "__APP__/Information/adList";
				    	}
			    	}
			    	
			    }

			});
		})
    </script>
</head>
<body>
	<div  class="easyui-panel" title="编辑信息" style="width:auto;background:#fafafa;" data-options="headerCls:'title',iconCls:'icon-apply'">
		<form id="saveInfo" method="post">
			
			<table>
			<volist name="infoData" id="vo">
			<input type="text" name="info_id" value="{$vo.info_id}"/>
				<tr>
					<td>标题：</td>
				</tr>
				<tr>

					<td><input type="text" class="info_title easyui-validatebox" name="info_title" data-options="validType:['length[1,200]'],required:true" style="width: 300px;height: 25px;" value="{$vo.info_title}"/></td>
				</tr>
				<tr>
					<td>内容：</td>
				</tr>
				<tr>
					<td>
						<textarea class="info_content" name="info_content" style="width:99%;height:500px;">{$vo.info_content}</textarea>
					</td>
				</tr>
				<tr>
					<td colspan="2" style="text-align: center;"><input type="submit" value="保存"/></td>
				</tr>
			</volist>
			</table>
		</form>
	</div>
</body>
</html>